package com.example.springboot3.service;

import com.example.springboot3.mapper.User1Mapper;
import com.example.springboot3.model.Articleinfo;
import com.example.springboot3.model.User1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class User1Service {
    @Autowired
    private User1Mapper user1Mapper;
    public List<User1> getAll() {
        return user1Mapper.getAll();
    }

    public int insert(User1 user1) {
        return user1Mapper.insert(user1);
    }

    public int insert2(User1 user1) {
        return user1Mapper.insert2(user1);
    }

    public int update(Integer id, String password) {
        return user1Mapper.update(id,password);
    }

    public int delete(Integer id) {
        return user1Mapper.delete(id);
    }

    public List<User1> selectLike(String str) {
        return user1Mapper.selectLike(str);
    }
    //直接使用了user1Mapper,没有创建新的Mapper,
    public List<Articleinfo> getAllPlus() {
        return user1Mapper.getAllPlus();
    }
}
